<?php

namespace App\Http\Controllers\Mini;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\CountCommissionModel;

class TeacherCountController extends Controller
{
    public function month_commission(Request $request) {
        $teacherId = $request->input('teacherId');
        $commissions = CountCommissionModel::where('teacher_id', $teacherId)->orderBy('id', 'desc')->limit(12)->get();
        return self::ok($commissions);
    }
}
